import request from "@/utils/request";
//  const ip = "http://192.168.0.109:8088"; 
/* const lj = "http://192.168.0.173:8088"; */
const tu = ip + "/oss/upload";
const ip = "http://sun.xinlinju.net";
//供应商 
export function gonyin_list(data) {
  return request({
    url: "/Supplier/getSupplierList",
    method: "post",
    data: data
  });
}
//供应商初审
export function gonyin_cs(data) {
  return request({
    url: "/Supplier/getFirstAudit",
    method: "post",
    data: data
  });
}
//供应商级别
export function gonyin_jibie(data) {
  return request({
    url:"/Supplier/getSupplierLevel",
    method: "post",
    data: data
  });
}
//供应商类别
export function gonyin_liebiao(data) {
  return request({
    url:"/Supplier/getSupplierTypeList",
    method: "post",
    data: data
  });
}
//删除供应商
export function gonyin_shanchu(data) {
  return request({
    url:"/Supplier/deleteSupplier",
    method: "post",
    data: data
  });
}
//供应商审核结果
export function gonyin_shenhe(data) {
  return request({
    url:"/Supplier/audit",
    method: "post",
    data: data
  });
}

//供应商详情
export function gonyin_xq(data) {
  return request({
    url:"/Supplier/getSupplierDetail",
    method: "post",
    data: data
  });
}
//新增供应商
export function gonyin_xz(data) {
  return request({
    url:"/Supplier/createSupplier",
    method: "post",
    data: data
  });
}

//编辑供应商
export function updateSupplier(data) {
  return request({
    url:"/Supplier/updateSupplier",
    method: "post",
    data: data
  });
}


//采购单列表
export function caigou_list(data) {
  return request({
    url:"/Purchase/getPurchaseList",
    method: "post",
    data: data
  });
}
//采购单详情
export function caigou_xq(data) {
  return request({
    url:"/Purchase//getPurchaseDetail",
    method: "post",
    data: data
  });
}
//图片上传
//"http://192.168.0.173:8088/oss/token"
export function tu_shangchuan(data) {
  return request({
    url: "/oss/token",
    method: "post",
    data: data
  });
}
//采购单修改
export function caigou_xg(data) {
  return request({
    url:"/Purchase/updatePurchase",
    method: "post",
    data: data
  });
}
//省市区查询 
export function diqu(data) {
  return request({
    url:"/Supplier/getSupplyArea",
    method: "post",
    data: data
  });
}

//远程查询供应商
export function caigou_cx(data) {
  return request({
    url:"/Supplier//getSupplierForPurchase",
    method: "post",
    data: data
  });
}
//查询商品
// export function cg_commodity(data) {
//   return request({
//     url: ip + "/Purchase/getGoodsList",
//     method: "post",
//     data: data
//   });
// }
//新增采购单 
export function cg_xinzen(data) {
  return request({
    url:"/Purchase//createPurchase",
    method: "post",
    data: data
  });
}
//采购单-明细-增加商品 
export function cg_zenjia(data) {
  return request({
    url:"/Purchase/createPurchaseGoods",
    method: "post",
    data: data
  });
}
//采购单-列表-删除
export function cg_lb_sc(data) {
  return request({
    url:"/Purchase/deletePurchase",
    method: "post",
    data: data
  });
}
//采购单-明细-商品-删除
export function cg_mx_sc(data) {
  return request({
    url:"/Purchase/deletePurchaseGoods",
    method: "post",
    data: data
  });
}
//采购单-明细-商品-修改
export function cg_mx_xg(data) {
  return request({
    url:"/Purchase/updatePurchaseGoods",
    method: "post",
    data: data
  });
}

export function goodQuery(data) {
  return request({
    url:"/goods/query/options",
    method: "post",
    data: data
  });
}

// 审核按钮
export function checkbtn(data) {
  return request({
    url:"/Purchase/saveOrAudit",
    method: "post",
    data: data
  });
}
